package com.ssy.lingxi.pay.entity.eAccount;

import lombok.Data;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * e账户状态记录
 * @author jw.chen
 * @version 2.0.0
 * @date 2021/12/2
 */
@Data
@Entity
@Table(schema = "public", name = "pay_e_account_status_record", indexes = {@Index(name = "pay_e_account_status_record_allInPay_id_idx", columnList = "allInPayId"),
        @Index(name = "pay_e_account_status_record_create_time_idx", columnList = "createTime")})
public class EAccountStatusRecord {
    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy= GenerationType.SEQUENCE, generator="e_account_status_record_seq")
    @SequenceGenerator(sequenceName="pay_e_account_status_record_seq", name="e_account_status_record_seq",allocationSize = 1)
    private Long id;

    /**
     * e账户
     */
    @Column(columnDefinition = "int", nullable = false)
    private Long allInPayId;

    /**
     * 审核状态: 1-解冻, 2-冻结
     */
    @Column(columnDefinition = "int", nullable = false)
    private Integer status = 1;

    /**
     * 操作时间
     */
    @Column(columnDefinition = "int8", nullable = false)
    private Long createTime;

    /**
     * 操作: 1-解冻资金账户, 2-冻结资金账户
     */
    @Column(columnDefinition = "int", nullable = false)
    private Integer operation;

    /**
     * 备注
     */
    @Column(columnDefinition = "varchar(200)")
    private String remark;

    /**
     * 交易单号(系统生成的)
     */
    @Column(columnDefinition = "varchar(100)")
    private String traceNo;

    /**
     * 冻结/解冻金额(前端传的)
     */
    @Column(columnDefinition = "numeric")
    private BigDecimal amount;

    /**
     * 交易单号(通联返回的)
     */
    @Column(columnDefinition = "varchar(100)")
    private String allInPayTraceNo;

    /**
     * 冻结/解冻金额(通联返回的)
     */
    @Column(columnDefinition = "numeric")
    private BigDecimal allInPayAmount;

    /**
     * 会员id
     */
    @Column(columnDefinition = "int8")
    private Long memberId;

    /**
     * 会员名称
     */
    @Column(columnDefinition = "varchar(60)")
    private String memberName;

    /**
     * 会员角色id
     */
    @Column(columnDefinition = "int8")
    private Long memberRoleId;

    /**
     * 会员角色名称
     */
    @Column(columnDefinition = "varchar(60)")
    private String memberRoleName;
}
